package org.jeecg.modules.wlhy.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.wlhy.order.entity.HyOrderPrice;
import org.jeecg.modules.wlhy.order.mapper.HyOrderPriceMapper;
import org.jeecg.modules.wlhy.order.service.IHyOrderPriceService;
import org.jeecg.modules.wlhy.order.vo.HyOrderPriceVO;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: hy_order_price
 * @Author: jeecg-boot
 * @Date:   2021-05-11
 * @Version: V1.0
 */
@Service
public class HyOrderPriceServiceImpl extends ServiceImpl<HyOrderPriceMapper, HyOrderPrice> implements IHyOrderPriceService {

    @Override
    public HyOrderPrice getByDriverAndOrderId(String driverId, String orderId) {
        return this.getOne(new QueryWrapper<HyOrderPrice>().eq("driver_id",driverId).eq("order_id",orderId));
    }

    @Override
    public IPage<HyOrderPriceVO> getPageList(Page<HyOrderPriceVO> page, QueryWrapper<HyOrderPrice> queryWrapper) {
        return page.setRecords(baseMapper.getPageList(page,queryWrapper));
    }
}
